package com.ccrfid.rmc6.pojo.dto.prison.door;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.List;

@JsonIgnoreProperties(value = "subIdList", allowGetters = false, allowSetters = true)
public class CountDto {
    private String orgName;
    private List<Long> subIdList;
    private Integer count;

    public CountDto() {
        this.count = 0;
    }

    public CountDto(String orgName, List<Long> subIdList) {
        this.orgName = orgName;
        this.subIdList = subIdList;
        this.count = 0;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public List<Long> getSubIdList() {
        return subIdList;
    }

    public void setSubIdList(List<Long> subIdList) {
        this.subIdList = subIdList;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public void countPlus() {
        this.count++;
    }

    public boolean containsOrg(Long orgId) {
        return subIdList != null ? subIdList.contains(orgId) : false;
    }
}
